/**********************************************************************
 * SailmiPIM - modular cross-platform feature Personal Information Manager Tools.
 * Copyright(C) 2006-2014  Georg Rudoy
 *
 * Distributed under the Boost Software License, Version 1.0.
 *(See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
 **********************************************************************/

#pragma once

#include <QVariant>
#include <util/sll/util.h>
#include <sailmipim/core/ihookproxy.h>

class QWidget;

namespace SailmiPIM::Plugin::TabSessManager
{
	class TabsPropsManager
	{
	public:
		using TabsProps_t = QList<QPair<QByteArray, QVariant>>;
	private:
		QList<TabsProps_t> TabsPropsQueue_;
		QList<int> PreferredWindowsQueue_;
    public:
        Q_REQUIRED_RESULT SailmiPIM::Util::DefaultScopeGuard AppendProps(const TabsProps_t&);
        Q_REQUIRED_RESULT SailmiPIM::Util::DefaultScopeGuard AppendWindow(int);

		void HandlePreferredWindowIndex(const IHookProxy_ptr&, const QWidget*);
		void HandleTabAdding(QWidget*);
	};
}
